(read_char): When an event from unread-command-events
authorGerd Moellmann <gerd@gnu.org>
Tue, 20 Feb 2001 18:12:00 +0000 (18:12 +0000)
committerGerd Moellmann <gerd@gnu.org>
Tue, 20 Feb 2001 18:12:00 +0000 (18:12 +0000)
is from the tool or menu bar, set *USE_MOUSE_MENU to 1.

src/keyboard.c

index cc2b41c4b9d22be3785a88a103594eeb7a5efb3f..6401389ca5a45f8a60a1dc1444e7dee70f3e04f1 100644 (file)
@@ -2141,6 +2141,12 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
          && NILP (XCDR (c)))
        c = XCAR (c);
 
+      /* If the queued event is something that used the mouse,
+         set used_mouse_menu accordingly.  */
+      if (used_mouse_menu
+         && (EQ (c, Qtool_bar) || EQ (c, Qmenu_bar)))
+       *used_mouse_menu = 1;
+      
       reread = 1;
       goto reread_for_input_method;
     }